Conversation
Co-authored-by: HackingGate <8541644+HackingGate@users.noreply.github.com>
|
@copilot rebase master branch |
|
Coverage after merging copilot/update-public-ip-servers into master
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||
1 similar comment
|
Coverage after merging copilot/update-public-ip-servers into master
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR modernizes the public IP server endpoints by replacing deprecated services with more reliable alternatives. The changes update the API service list, corresponding tests, and documentation to reflect current best practices for IP address lookup services.
- Removes 4 deprecated services (ipv6test, seeip, whatismyipaddress, ipecho) and adds 3 modern services (ifconfig.me, my-ip.io, ipinfo.io)
- Updates all test functions to match the new service endpoints
- Updates README documentation with current service list and links
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| Sources/PublicIPAPIURLs.swift | Updates enum cases across Hybrid, IPv4, and IPv6 categories with new service endpoints |
| Tests/SwiftPublicIPTests/SwiftPublicIPTests.swift | Updates test functions and test registry to match new service endpoints |
| README.md | Updates service list documentation with links to new service providers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| case seeip = "https://ip.seeip.org" | ||
| case whatismyipaddress = "https://bot.whatismyipaddress.com" | ||
| case ipify = "https://api.ipify.org" | ||
| case ifconfigMe = "https://ifconfig.me/ip" |
There was a problem hiding this comment.
The enum case name "ifconfigMe" uses an inconsistent naming convention. The other enum cases in this file use all lowercase names (icanhazip, ipify, ident, amazonaws, ipinfo), but this one uses camelCase with a capital 'M'. For consistency with the rest of the codebase, consider renaming this to "ifconfigme" (all lowercase).
| func test_hybrid_ifconfigMe() { | ||
| let exp = expectation(description: "\(#function)\(#line)") | ||
| testPublicIP(PublicIPAPIURLs.Hybrid.seeip.rawValue, exp) | ||
| testPublicIP(PublicIPAPIURLs.Hybrid.ifconfigMe.rawValue, exp) | ||
| waitForExpectations(timeout: 40, handler: nil) |
There was a problem hiding this comment.
The test function name "test_hybrid_ifconfigMe" should match the naming convention of other test functions. If the enum case is renamed to "ifconfigme" (all lowercase) for consistency, this test function name should be updated to "test_hybrid_ifconfigme" to match.
| func test_ipv6_ifconfigMe() { | ||
| let exp = expectation(description: "\(#function)\(#line)") | ||
| testPublicIP(PublicIPAPIURLs.IPv6.seeip.rawValue, exp) | ||
| testPublicIP(PublicIPAPIURLs.IPv6.ifconfigMe.rawValue, exp) | ||
| waitForExpectations(timeout: 40, handler: nil) |
There was a problem hiding this comment.
The test function name "test_ipv6_ifconfigMe" should match the naming convention of other test functions. If the enum case is renamed to "ifconfigme" (all lowercase) for consistency, this test function name should be updated to "test_ipv6_ifconfigme" to match.
| ("test_hybrid_seeip", test_hybrid_seeip), | ||
| ("test_hybrid_whatismyipaddress", test_hybrid_whatismyipaddress), | ||
| ("test_hybrid_ipify", test_hybrid_ipify), | ||
| ("test_hybrid_ifconfigMe", test_hybrid_ifconfigMe), |
There was a problem hiding this comment.
The test entry string "test_hybrid_ifconfigMe" should match the naming convention of other test entries. If the enum case and test function are renamed to use all lowercase "ifconfigme", this entry should be updated to ("test_hybrid_ifconfigme", test_hybrid_ifconfigme) to match.
| ("test_hybrid_ifconfigMe", test_hybrid_ifconfigMe), | |
| ("test_hybrid_ifconfigme", test_hybrid_ifconfigMe), |
|
|
||
| ("test_ipv4_ipify", test_ipv4_ipify), | ||
|
|
||
| ("test_ipv4_ifconfigMe", test_ipv4_ifconfigMe), |
There was a problem hiding this comment.
The test entry string "test_ipv4_ifconfigMe" should match the naming convention of other test entries. If the enum case and test function are renamed to use all lowercase "ifconfigme", this entry should be updated to ("test_ipv4_ifconfigme", test_ipv4_ifconfigme) to match.
|
|
||
| case ipify = "https://api.ipify.org" | ||
|
|
||
| case ifconfigMe = "https://ipv4.ifconfig.me/ip" |
There was a problem hiding this comment.
The enum case name "ifconfigMe" uses an inconsistent naming convention. The other enum cases in this file use all lowercase names (icanhazip, ipify, ident, amazonaws, ipinfo), but this one uses camelCase with a capital 'M'. For consistency with the rest of the codebase, consider renaming this to "ifconfigme" (all lowercase).
| case ident = "https://v6.ident.me/" | ||
|
|
||
| case ipify = "https://api6.ipify.org" | ||
| case ifconfigMe = "https://ipv6.ifconfig.me/ip" |
There was a problem hiding this comment.
The enum case name "ifconfigMe" uses an inconsistent naming convention. The other enum cases in this file use all lowercase names (icanhazip, ipify, ident, amazonaws, ipinfo), but this one uses camelCase with a capital 'M'. For consistency with the rest of the codebase, consider renaming this to "ifconfigme" (all lowercase).
| } | ||
|
|
||
| func test_ipv4_seeip() { | ||
| func test_ipv4_ifconfigMe() { |
There was a problem hiding this comment.
The test function name "test_ipv4_ifconfigMe" should match the naming convention of other test functions. If the enum case is renamed to "ifconfigme" (all lowercase) for consistency, this test function name should be updated to "test_ipv4_ifconfigme" to match.
| func test_ipv4_ifconfigMe() { | |
| func test_ipv4_ifconfigme() { |
|
|
||
| ("test_ipv6_ipify", test_ipv6_ipify) | ||
| ("test_ipv6_ipify", test_ipv6_ipify), | ||
| ("test_ipv6_ifconfigMe", test_ipv6_ifconfigMe), |
There was a problem hiding this comment.
The test entry string "test_ipv6_ifconfigMe" should match the naming convention of other test entries. If the enum case and test function are renamed to use all lowercase "ifconfigme", this entry should be updated to ("test_ipv6_ifconfigme", test_ipv6_ifconfigme) to match.
Update Public IP Servers
Summary
Updated public IP server endpoints to more reliable and modern services. The changes include:
Removed: ipv6test, seeip, whatismyipaddress, ipecho
Added: ifconfig.me, my-ip.io, ipinfo.io
Kept: icanhazip, ipify, ident.me, amazonaws
Merged latest master branch changes (GitHub Actions artifact version updates).
All changes maintain backward compatibility with the existing API structure. Tests have been updated accordingly.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.